A simple implementation of the modulo (%) operator. To alternative, simpler implementation
Works by calculating the smallest number greater than or equal to the a number and subtracting the a value by the difference of that number and the b value.
// a: 9, b:2 --> [0, 2, 4, 6, 8, c: 10] 10 > 9, so 10-9=1 // a: 17, b: 3 --> [0, 3, 6, 9, 12, 15, 18] 18 >= 17, so look at 18 - 3 = 15. 17 - 15 = 2. // a: 21, b: 3 --> [0, 3, 6, 9, 12, 15, 18, 21] 21 >= 21